package cn.pconline.autoclub.entity;

import java.util.Date;

import org.gelivable.dao.Column;
import org.gelivable.dao.Entity;
import org.gelivable.dao.Id;
import org.gelivable.dao.Label;
import org.gelivable.dao.Transient;

/**
 *
 * 会员每日限制 目前只有取得油值限制 后续可能添加
 * @author wanganning
 */
@Entity(tableName = "ac_user_limit")
public class UserLimit {
	/**每人每天最高油值数*/
	public final static int DAILY_PERSON_LIMIT = 50;

    @Id
    @Column(name = "id")
    private long id;
    
    @Label("会员id")
    @Column(name = "user_id")
    private long uid; //ClubMember's id field
    
    @Column(name = "ymd")
    private int ymd;    //日期
    
    @Column(name = "petrol")
    private int petrol;
    
    @Column(name="createAt")
    private Date createAt; //创建时间
    
    @Column(name="updateAt")
    private Date updateAt; //最后更新时间
    
    @Transient(cache = false)
    private User user;
    public long getId() {
        return id;
    }

    /**
     * @param id ClubMember's id,not userId
     */
    public void setId(long id) {
        this.id = id;
    }

    /**
     * relate ClubMember's id
     * @return
     */
    public long getUid() {
        return uid;
    }

    public void setUid(long uid) {
        this.uid = uid;
    }

    public int getYmd() {
        return ymd;
    }

    public void setYmd(int ymd) {
        this.ymd = ymd;
    }

    public int getPetrol() {
        return petrol;
    }

    public void setPetrol(int petrol) {
        this.petrol = petrol;
    }

    public Date getCreateAt() {
        return createAt;
    }

    public Date getUpdateAt() {
        return updateAt;
    }

    public void setCreateAt(Date createAt) {
        this.createAt = createAt;
    }

    public void setUpdateAt(Date updateAt) {
        this.updateAt = updateAt;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }
    
	@Override
	public String toString() {
		return "UserLimit [id=" + id + ", uid=" + uid + ", ymd=" + ymd
				+ ", petrol=" + petrol + "]";
	}
    
    
}
